#pragma once

#include "IGameState.h"							// uses IGameState

class Player;
class TileEngine;


class GameplayState : public IGameState {

		//	Pause System
	struct Pause{
		bool isPaused = false;
		SGD::Rectangle m_PauseScreen;
		int m_nCursor = 1;
	};
		//	Win / Lose System
	struct EndGame{
		bool Losing = false;
		bool Winning = false;
		bool GameOver = false;
	};

	Pause m_pause;
	EndGame m_endgame;

	Player* m_Player;
	TileEngine* m_TileEngine;

public:

		// Singleton Accessor:
	static GameplayState* GetInstance( void );

		// IGameState Interface:
	virtual void	Enter	( void )				override;	// load resources
	virtual void	Exit	( void )				override;	// unload resources
													
	virtual bool	Update	( float elapsedTime )	override;	// handle input & update entities
	virtual void	Render	( float elapsedTime )	override;	// render game entities / menus

private:
		// SINGLETON (not-dynamically allocated)
	GameplayState( void ) = default;	// default constructor
	virtual ~GameplayState( void )	= default;	// destructor
	GameplayState( const GameplayState& )				= delete;	// copy constructor
	GameplayState& operator= ( const GameplayState& )	= delete;	// assignment operator

	SGD::HAudio		m_win = SGD::INVALID_HANDLE;
	SGD::HAudio		m_lose = SGD::INVALID_HANDLE;
};